//
// Stream.hpp for Stream in /home/mambou_j//babel-2014
// 
// Made by jacquesquentin mamboumouafo
// Login   <mambou_j@epitech.net>
// 
// Started on  Mon May 14 18:39:50 2012 jacquesquentin mamboumouafo
// Last update Mon May 14 18:57:51 2012 jacquesquentin mamboumouafo
//


#ifndef	__STREAM_HPP__
#define	__STREAM_HPP__

#include	"portaudio.h"

// Forward declaration(s):
namespace	portaudio
{
  class	StreamParameters;
}

// Declaration(s):
namespace	portaudio
{

	class	Stream
	{
	public:
	  //opening/closing:
	  virtual	~Stream();

	  virtual	void close();
	  bool	isOpen() const;

	  //Additional set up:
	  void	setStreamFinishedCallback(PaStreamFinishedCallback *callback);

	  // State management:
	  void	start();
	  void	stop();
	  void	abort();

	  bool	isStopped() const;
	  bool	isActive() const;

	  // Stream info (time-constant, but might become time-variant soon):
	  PaTime	inputLatency() const;
	  PaTime	outputLatency() const;
	  double	sampleRate() const;

	  // Stream info (time-varying):
	  PaTime	time() const;

	  const	PaStream *paStream() const;
	  PaStream	*paStream();

	protected:
	  Stream();
	  PaStream	*stream_;

	private:
	  Stream(const Stream &);
	  Stream	&operator=(const Stream &);
	};
}
